package com.germinus.telcoblocks.echarts.editor.editors;

import org.eclipse.jface.text.rules.*;

public class ECHPartitionScanner extends RuleBasedPartitionScanner {
	public final static String ECH_COMMENT = "__ech_comment";
	public final static String ECH_KEYWORD = "__ech_keyword";
	public final static String ECH_JAVA_CODE = "__ech_java_code";
	public final static String ECH_SINGLE_LINE_COMMENT = "__ech_single_line_code";

	public ECHPartitionScanner() {
		IToken echComment = new Token(ECH_COMMENT);
		IToken echSingleLineComment = new Token(ECH_SINGLE_LINE_COMMENT);
		IPredicateRule[] rules = new IPredicateRule[2];
		rules[0] = new MultiLineRule("/**", "*/", echComment);
		rules[1] = new SingleLineRule("//", "", echSingleLineComment);
		setPredicateRules(rules);
	}
}
